const aiAction = [
  {
    id: 'voiceFeedbackServer.start',
    name: '开启语音提示',
    type: 'AI辅助',
    exec: app => {
      app.voiceFeedbackServer.start()
    }
  },
  {
    id: 'voiceFeedbackServer.stop',
    name: '关闭语音提示',
    type: 'AI辅助',
    exec: app => {
      app.voiceFeedbackServer.stop(false)
    }
  },
  {
    id: 'voiceFeedbackServer.toggle',
    name: '切换语音提示',
    type: 'AI辅助',
    exec: app => {
      app.voiceFeedbackServer.isStart
        ? app.voiceFeedbackServer.stop()
        : app.voiceFeedbackServer.start()
    }
  },
  {
    id: 'voiceRecognizeServer.start',
    name: '开启语音识别',
    type: 'AI辅助',
    exec: app => {
      app.voiceRecognizeServer.start()
    }
  },
  {
    id: 'voiceRecognizeServer.stop',
    name: '关闭语音识别',
    type: 'AI辅助',
    exec: app => {
      app.voiceRecognizeServer.stop()
    }
  },
  {
    id: 'voiceRecognizeServer.toggle',
    name: '切换语音识别',
    type: 'AI辅助',
    exec: app => {
      app.voiceRecognizeServer.isStart
        ? app.voiceRecognizeServer.stop()
        : app.voiceRecognizeServer.start()
    }
  },
  {
    id: 'faceRecognizeServer.start',
    name: '开启人脸识别',
    type: 'AI辅助',
    exec: app => {
      app.faceRecognizeServer.start()
    }
  },
  {
    id: 'faceRecognizeServer.stop',
    name: '关闭人脸识别',
    type: 'AI辅助',
    exec: app => {
      app.faceRecognizeServer.stop()
    }
  },
  {
    id: 'faceRecognizeServer.toggle',
    name: '切换人脸识别',
    type: 'AI辅助',
    exec: app => {
      console.log(0)
      app.faceRecognizeServer.isStart
        ? app.faceRecognizeServer.stop()
        : app.faceRecognizeServer.start()
    }
  },
  {
    id: 'gestureRecognizeServer.start',
    name: '开启手势识别',
    type: 'AI辅助',
    exec: app => {
      if (!app.envServer.videoStatus) {
        app.msg({type: 'error', content: '未检测到摄像头，无法开启手势识别'})
        return
      }
      app.gestureRecognizeServer.start()
    }
  },
  {
    id: 'gestureRecognizeServer.stop',
    name: '关闭手势识别',
    type: 'AI辅助',
    exec: app => {
      app.gestureRecognizeServer.stop()
    }
  },
  {
    id: 'gestureRecognizeServer.toggle',
    name: '切换手势识别',
    type: 'AI辅助',
    exec: app => {
      app.gestureRecognizeServer.isStart
        ? app.gestureRecognizeServer.stop()
        : app.gestureRecognizeServer.start()
    }
  },
  {
    id: 'lightSensorServer.start',
    name: '开启光感识别',
    type: 'AI辅助',
    exec: app => {
      app.lightSensorServer.start()
    }
  },
  {
    id: 'lightSensorServer.stop',
    name: '关闭光感识别',
    type: 'AI辅助',
    exec: app => {
      app.lightSensorServer.stop()
    }
  },
  {
    id: 'lightSensorServer.toggle',
    name: '切换光感识别',
    type: 'AI辅助',
    exec: app => {
      app.lightSensorServer.isStart
        ? app.lightSensorServer.stop()
        : app.lightSensorServer.start()
    }
  }
]
export default aiAction
